import datetime

from pydantic import BaseModel, Field

from forward.extend.pydantic.base import BaseSchema
from forward.model.schemas.lucky.order import ActivityOrderOutSchema, ActivityOrderSchema
from forward.utils.tools import ToolsUtil


class ActivityOrderAddInSchema(BaseSchema):
    pass


class ActivityOrderListInSchema(BaseSchema):
    merchant_id: int | None = None
    code: str | None = None
    contact_phone: str | None = None
    status: int | None = None
    page_num: int = 1
    page_size: int = 20
    model_config = {
        "alias_generator": ToolsUtil.to_lower_camel,
        "populate_by_name": True,
    }


class ActivityOrderDetailOutSchema(ActivityOrderOutSchema):
    activity_type_text: str | None = None
    prize_level_text: str | None = None


class ActivityOrderDetailInSchema(BaseModel):
    id: int


class ActivityOrderStatusInSchema(BaseModel):
    id: int
    status: int


class ActivityOrderSiginInSchema(BaseModel):
    id: int
    status: int | None = None
    remark: str | None = None
